﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="details.aspx.cs" Inherits="text.details" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
        <script>
        function alertReply(comment_id) {
            window.open("Reply.aspx?cid=" + comment_id);
           
        }
        function delComment(cid) {
            //ajax
            var xhttp;
            if (window.XMLHttpRequest) {
                xhttp = new XMLHttpRequest();
            } else {
                // code for IE6, IE5
                xhttp = new ActiveXObject("Microsoft.XMLHTTP");
            }
            xhttp.onreadystatechange = function () {
                if (this.readyState == 4 && this.status == 200) {
                    var result = xhttp.responseText;
                    if (result == "true") {
                        alert('删除成功');
                        window.location.reload();
                    }
                }
            };
            xhttp.open("GET", "DelCommentHandler.ashx?cid=" + cid, true);
            xhttp.send();

        }
        function delReply(rid) {
            //删除
            var xhttp;
            if (window.XMLHttpRequest) {
                xhttp = new XMLHttpRequest();
            } else {
                // code for IE6, IE5
                xhttp = new ActiveXObject("Microsoft.XMLHTTP");
            }
            xhttp.onreadystatechange = function () {
                if (this.readyState == 4 && this.status == 200) {
                    var result = xhttp.responseText;
                    if (result == "true") {
                        alert('删除成功');
                        window.location.reload();
                    }
                }
            };
            xhttp.open("GET", "Handler2.ashx?cid=" + rid, true);
            xhttp.send();
        }

        </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="box_right col-lg-9 ">
        <div class="segment left">

            <i class=" glyphicon glyphicon-book left"></i>
            <h3 class="left">日志内容<br>
                <span>管理这个设备及其传感器</span>
            </h3>
        </div>

        <div class="clear"></div>


        <!--发布日志-->
     
        <%=InitNote() %>
        <!--评论开始-->
        <%=InitComment() %>
        
        <!--提交留言-->
        <div id="rizhi_box" class="left" style="padding-left: 30px; padding-top: 10px;">
            <div >


                <div class="my-group" id="group2">
                    <span class="left"><mark>*</mark>留言板：</span>
                    <textarea type="text" runat="server" id="txtComment" class="form-control put3 put5" placeholder="请输入内容">             </textarea>
                </div>

                <div class="form-actions">
                    <asp:Button runat="server" CssClass="btn-primary btn" ID="btnComment" Text="发布评论" OnClick="btnComment_Click" />
                </div>


            </div>
        </div>




    </div>
</asp:Content>
